package com.lemon.rpcframe.dao.contract;

import java.util.List;

import com.lemon.rpcframe.annotation.OperationContract;
import com.lemon.rpcframe.annotation.ServiceContract;
import com.lemon.rpcframe.dao.entity.NodeGroupBean;

@ServiceContract
public interface INodeGroupService {

    /**
     * 保存一组信息
     * @param entity
     * @return
     * @throws Exception
     */
    @OperationContract
    public abstract long insert(NodeGroupBean entity) throws Exception;

    /**
     * 根据节点组名 删除一个节点组
     * @param name
     * @return
     * @throws Exception
     */
    @OperationContract
    public abstract long delete(String nodetype, String name) throws Exception;

    /**
     * 根据名称获取一个节点组
     * @param name
     * @return
     * @throws Exception
     */
    @OperationContract
    public abstract List<NodeGroupBean> loadByType(String nodetype) throws Exception;

    @OperationContract
    public abstract NodeGroupBean loadByTypeName(String nodetype, String name) throws Exception;

}
